<include file="Public:header" />



<style>
.header{display:none;}
.w790{margin-top:0px;}
</style>

<div class="container main"> <include file="Public:left" />
<script>
	//更新排序
	function update_weixin_sort(){
		var data=new Array();
		$("input[name='id']").each(function(index, element) {
            data.push($(this).val()+'_'+$(this).parent().parent().find("input[name='weixin_sort']").val());
        });
		$.post("{:U('doweixin_sort')}",{'sort':data.toString()},function(data){
			if(data=='OK'){
				alert('更新成功');
			}
		});
	}
</script>
  <div class="w790">
  
  
  <div class="h"><a href="{:U('add',array('template_id' =>$template_id))}" class="btn btn-info"><i class="glyphicon glyphicon-plus"></i>新增模块</a></div>

    
<div class="table_"><table class="table table-bordered" width="100%" border="0" cellspacing="0" cellpadding="0">
 <thead>
 <tr>
    <td height="21" align="center">ID</td>
    <td align="center">模块名称</td>
    <td align="center">图片</td>
    <td align="center">分类</td>
    <td align="center">类型</td>
    <td align="center">模块文件名</td>
    <td align="center">状态</td>
  
    

    <td align="center">排序</td>
    <td align="center">操作</td>
  </tr>
</thead>
<volist name="list" id="vo">
  <tr class="data_list">
    <td align="center"><input type="checkbox" name="id" id="id" class="sall" value="{$vo.id}" /></td>
    <td style="text-indent:{$vo['cl']*10}px"><gt name="vo['cl']" value="0">|-</gt>{$vo.title}</td>
    <td><img src="{:getThumbPath($vo['img_url'])}" width="50" height="50" /></td>
    <td>{$vo.mtitle}</td>
    <td>
    <eq name="vo['type']" value="0">
    自定义模块
    </eq>
    <eq name="vo['type']" value="1">
    产品列表模块
    </eq>
    <eq name="vo['type']" value="2">
    文章列表模块
    </eq>
    
    <eq name="vo['type']" value="3">
    轮播图模块
    </eq>
    
    <eq name="vo['type']" value="4">
    单页内容模块
    </eq>
    
    <eq name="vo['type']" value="5">
    布局模块
    </eq>
    </td>
    <td>{$vo.filename}</td>
    <td align="center"><eq name="vo['status']" value="1"><span class="status1 status_btn" field="status,{$vo.id}"></span><else/><span class="status0 status_btn" field="status,{$vo.id}"></span></eq></td>
    
    
    
    <td align="center"><input name="sort" width="30" type="text" value="{$vo.sort}" size="4" /><a href="javascript:void(0);" onclick="update_sortClick('id','up',this,'sort','{:U('dosort')}');">上</a><a href="javascript:void(0);" onclick="update_sortClick('id','',this,'sort','{:U('dosort')}');">下</a></td>
    <td align="center"><a href="{:U('edit',array('id'=>$vo['id'],'type' =>$type, 'position' => $position))}" title="编辑" class="editbtn">编辑</a> | <a href="{:U('delete',array('id'=>$vo['id']))}" onclick="return confirm('您确定要删除这条记录吗？');" class="delbtn" title="删除">删除</a></td>
  </tr>


       <volist name="vo['sub']" id="svo">
       	<tr class="data_list">
          <td align="center"><input type="checkbox" name="id" id="id" class="sall" value="{$svo.id}" /></td>
          <td>{$svo.title}</td>
          <td><img src="{:getThumbPath($svo['img_url'])}" width="50" height="50" /></td>
          <td>&nbsp;</td>
          <td><eq name="vo['type']" value="0">
    自定义模块
    </eq>
    <eq name="vo['type']" value="1">
    产品列表模块
    </eq>
    <eq name="vo['type']" value="2">
    文章列表模块
    </eq>
    
    <eq name="vo['type']" value="3">
    轮播图模块
    </eq>
    
    <eq name="vo['type']" value="4">
    单页内容模块
    </eq>
    
    <eq name="vo['type']" value="5">
    布局模块
    </eq></td>
          <td>{$svo.filename}</td>
    <td align="center"><eq name="svo['status']" value="1"><span class="status1 status_btn" field="status,{$svo.id}"></span><else/><span class="status0 status_btn" field="status,{$svo.id}"></span></eq></td>
    
    
   
          <td align="center"><input name="sort" width="30" type="text" value="{$svo.sort}" size="4" /><a href="javascript:void(0);" onclick="update_sortClick('id','up',this,'sort','{:U('dosort')}');">上</a><a href="javascript:void(0);" onclick="update_sortClick('id','',this,'sort','{:U('dosort')}');">下</a></td>
          <td align="center"><a href="{:U('edit',array('id'=>$svo['id'],'type' =>$type, 'position' => $position))}" class="editbtn">编辑</a> | <a href="{:U('delete',array('id'=>$svo['id']))}" onclick="return confirm('您确定要删除这条记录吗？');" class="delbtn">删除</a></td>
        </tr>
       </volist>
</volist>
  
</table></div>
<div class="pages">
      
        <form class="fr" style="display:inline;" id="pagesize" action="" method="get">
          每页
          <select name="pagesize" onchange="document.getElementById('pagesize').submit();">
            <option 
            <eq name="pagesize" value="10">selected="selected"</eq>
             value="10">10
            </option>
            <option 
            <eq name="pagesize" value="20">selected="selected"</eq>
             value="20">20
            </option>
            <option 
            <eq name="pagesize" value="30">selected="selected"</eq>
             value="30">30
            </option>
            <option 
            <eq name="pagesize" value="50">selected="selected"</eq>
             value="50">50
            </option>
            <option 
            <eq name="pagesize" value="100">selected="selected"</eq>
             value="100">100
            </option>
            <option 
            <eq name="pagesize" value="500">selected="selected"</eq>
             value="500">500
            </option>
          </select>
          条
          <input type="hidden" name="category_id" value="{$category_id}" />
          <input type="hidden" name="keywords" value="{$keywords}" />
        </form>
        <div class="fr">{$pages}</div>
    </div>
  </div>
  <div class="clear"></div>
</div>
</body></html>